#include "ClassElement.h"
//necessary
#include "memory-tools.h"

//TODO testing
PclassElement initClassElement(char* _name, bool _isAbstract, bool _isStatic, PidentifierList _groupList, PidentifierList _parentList, ResourceHashTable _resources){
	PclassElement result=(PclassElement)mallocMemory(sizeof(ClassElement),"ClassElement.c:initClassElement:1");
	result->name=_name;
	result->isAbstract=_isAbstract;
	result->isStatic=_isStatic;
	result->groupList=_groupList;
	result->parentList=_parentList;
	result->resources=_resources;
	return result;
}


//TODO testing
void freeClassElement(PclassElement pobj){
	//name should not be freed (it is attached to the syntax tree)
	//isAbstract is ignored
	//isStatic is ignored
	//groupList should be freed (but not the labels themselves!)
	//parentList should be freed (but not the labels themselves!)
	//resources should be freed (but not the labels themselves!)
	freeResourceHashTable(&pobj->resources);
}

void printClassElement(FILE* f,PclassElement pobj){
	//TODO code here
}
